<#--
  Controller 一对多专用接口方法
-->

    @Operation(summary = "新增${table.comment!table.entityName}(含关联数据)")
    @RequiresPermission("${permissionPrefix}:add")
    @PostMapping("/with-relations")
    public Result<${table.entityName}DTO> addWithRelations(@Valid @RequestBody ${table.entityName}DTO dto) {
        ${table.entityName}DTO result = ${lowerEntity}Service.createWithRelations(dto);
        return Result.success(result);
    }

    @Operation(summary = "修改${table.comment!table.entityName}(含关联数据)")
    @RequiresPermission("${permissionPrefix}:edit")
    @PutMapping("/{id}/with-relations")
    public Result<${table.entityName}DTO> editWithRelations(@PathVariable ${pkType} id, @Valid @RequestBody ${table.entityName}DTO dto) {
        ${table.entityName}DTO result = ${lowerEntity}Service.updateWithRelations(id, dto);
        return Result.success(result);
    }


